﻿<?xml version="1.0" encoding="utf-8" ?>
<Feature id="DynBizObj" name="Dynamic BizObj Definition">
	<BusinessRules>
		<BusinessRule name="getDefinedDynBizObjs" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="getDynBizObj" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="updateBizObjDefinition" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="deleteBizObjDefinition" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="deleteBizObjField" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="getBaseBizObjTypesForDynBizObjs" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="getDynBizObjFieldTypes" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="setupDynamicBizObjs" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
	</BusinessRules>

	<BusinessRules>
		<BusinessRule name="getDynBizObjAssociations" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="updateDynBizObjAssociation" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="deleteDynBizObjAssociation" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="getAssociationUniquenessTypes" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjDefinitionBizRules,ScsCore" />
			</Option>
		</BusinessRule>
	</BusinessRules>	

	<BusinessRules>
		<BusinessRule name="getDynBizObjInstances" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjValuesBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="getDynBizObjInstance" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjValuesBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="updateBizObjInstance" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjValuesBizRules,ScsCore" />
			</Option>
		</BusinessRule>
		<BusinessRule name="deleteBizObjInstance" security="disabled">
			<Option value="$DynBizObjRemoteTier$">
				<RemoteRule url="$DynBizObjRemoteTier$" />
				<LocalClass name="DynBizObj.DynBizObjValuesBizRules,ScsCore" />
			</Option>
		</BusinessRule>
	</BusinessRules>	


	<BusinessObjects>
		<BusinessObject type="DynamicBizObjField" key="id">
			<Field name="id" type="Guid"><NULL/></Field>
			<Field name="name" type="String"/>
			<Field name="type" type="String" />
			<Field name="showInMainGrid" type="Boolean"/>
			<Field name="showInSubGrid" type="Boolean" />
			<Field name="displayOrder" type="Integer" />
		</BusinessObject>
		
		<BusinessObject type="DynamicBizObjDefinition" key="id">
			<Field name="id" type="Guid"><NULL/></Field>
			<Field name="name" type="String"/>
			<Field name="baseBizObj" type="String"/>
			<Field name="companyId" type="Guid"/>
			<Field name="companyShortName" type="String" />
			<Field name="fields" type="List(DynamicBizObjField)" />
			<Field name="isPublished" type="Boolean" />
			<Field name="visibleToChildCompanies" type="Boolean" />
			<Field name="isAbstract" type="Boolean" />
		</BusinessObject>

		<BusinessObject type="DynamicBizObjAssociation" key="id">
			<Field name="id" type="Guid"><NULL/></Field>
			<Field name="bizObjTypeId" type="Guid"><NULL/></Field>
			<Field name="associatedTypeId" type="Guid"><NULL/></Field>
			<Field name="name" type="String"/>
			<Field name="uniqueness" type="Integer" /><!--0= -->
			<Field name="displayOrder" type="Integer" />
		</BusinessObject>

		<BusinessObject type="DynamicBizObjValue" key="id">
			<Field name="id" type="Guid"><NULL/></Field>
			<Field name="bizObjTypeId" type="Guid"><NULL/></Field>
			<Field name="companyId" type="Guid"/>
			<Field name="bizObj" type="BizObj"/>
		</BusinessObject>
	</BusinessObjects>

	<ApplicationData>
		<Entry name="dynamicBizObjTypes" type="Swaf.Container.FlexiMap" />
		<Entry name="dynamicBizObjTypes.BizObj" type="String">BizObj</Entry>
		<Entry name="DynBizObjAssUniqueTypes" type="IBizObjList.IntOptionListOption">
			<IntOptionListOptions>
				<IntOptionListOption id="0" name="No Limits" />
				<IntOptionListOption id="1" name="Once To This Object" />
				<IntOptionListOption id="2" name="Once In Association" />
			</IntOptionListOptions>
		</Entry>
	</ApplicationData>
	
	<ApplicationEvents>
			<ApplicationStart>
				<Rule method="setupDynamicBizObjs" paramHandling="specifiedOnly">
					<Params/>
				</Rule>
			</ApplicationStart>
	</ApplicationEvents>
	

	<ClassFactory id="BizProcs">
		<Class type="DynBizObj.Gui.DynBizObjTypeBizProc,ScsCore" name="DynBizObjType"/>
		<Class type="DynBizObj.Gui.DynBizObjFieldBizProc,ScsCore" name="DynBizObjField"/>
		<Class type="DynBizObj.Gui.DynBizObjAssociationBizProc,ScsCore" name="DynBizObjAss"/>
		<Class type="DynBizObj.Gui.DynBizObjInstancesBizProc,ScsCore" name="DynBizObjVal"/>
	</ClassFactory>
</Feature>